standardize and simplify conditionals
add TODO