Added new constructor that takes in context