added if to check input for gross pay