new type safety features in classes
refactor to the classes system