Incorporating cmd functions