Changed around the lock to include the remove within said lock