trying to implement custom class