using class eval instead of instance method