add logging and urllib