started writing resize function
finished main resizing logic
fixed inBounds error