code written for haussler lab rotation