changes to work on spatial model