changed size as only argument and using class method