for writing small pieces codes