switch to using blocks