working well after further abstraction