changed the sizes array from a numeric array to an object to improve code readability