create function to resolve classes