improve code to be more natural with framework guidelines