code optimized and started post function functionality
 Please enter the commit message for your changes. Lines starting