adding logging and global object