added check of ability of movement