no more resize, cleaned code a little