move this method around
add logging support with winston