use relative path for generate function