Simplify code

No need to return boolean types.