scoping fixed and returns changed to bool