adding restrict and unrestrict commands and functionality