cleaned up horizon and function names