restructure the code to push only client from phonegap