better logging + some more functions