wip, added resize function