Implemented h and d flags