Added raptorize animation and a lock variable
Now using promises