added movecost dependent on distance moved