add logging
add testing