Moved everything to class method