Function definition now works