Changed the name for the function waitfor to waiFor, but kept the old name for compatibility reasons