higher level implementation