updated more comments, fixed array to int