changed return values to bool