removed ctx function argument