maybe change function input from e to a so it's not duplicated later?