had to modify the combined function to ender