implemented mkdir function