made code work regardless of dir name