corrected type in function call ('before' to 'after')