adding test and reoganize the app