various code updates