added shake functionality - yet to be tested on physical device
improved shake functionality