implement two methods