conditionals assigment added conditionals fixed arrays solve problem