storing context is local variable is a bad practive