Code inside allowedPosition method is now cleaner