changed return values to boolean