removed hardcoded 'localhost' url