method injection from class