removed a duplicate funtion from code.