avoid calling method twice