add logging (final commit I hope..)