cleaned up utility testing
split if command into functions