Added a sleep interval to free up resources