transformed sync php files to funcctions
added new version of syncing. Create sync api with slim microframework
added new functions about ync