modified SqlRepository