removed logger, minor optimisations