reimplemented commonDir