add function to misc, minor style tweaks