adding copious logging MAKE IT BETTER LATER