completed laptop resize function