correct ordering
add comment and TODO
remove unnecessary if