add logging and map