specified position function and changed to arrow function