sketched automaticrefinement routines