changed types of method to class methods and fixed issue with child context