various code additions