remove need for array functions, change conditionals