combined karma functions to prevent async issues