added possibility to add context for function to be called in