trying to add class method and did not succeed
not completely working version