katie and Emily's code, avanti's code to be added