Updated the resize function to accept width x height instead of just width