fixed some extraneous conditionals