Added shake() function