Resize funciton now working.