Tried to implement auto resize