cleanup
cleanup - reduce code
array can be passed