adjust code for 30 seconds