cleaned up tabs, fixed conditionals