implementing smart factory