slight restructure to main greylogd