added relpath. Code review needed