now we can use dir to define one path or normal api