fix return precedence
remove redundant space
add comparison operators