fixing syntax error, adding sleep