added all functionality except sudo rules