added taking restriction command and minor bug fixes