added support for custom user class