add loggin and some other small stuff