replace with object method