finished forloops, working on ifelse