moved mkdir from one method to another