Replace methods call with variable