made logic edits and removed tabs