revamp as a class