refactored flatprofile printer