Reworked resolve method to follow closure pattern