using node url lib for parsing