replaced if conds with more hip stuff