changed arrays to be initwith capacity. changed tests to shorthand for cleaner and more readability.