moved temp function to it's own file.