still need to fix boundaries of surface and bed