new file for messy util functions