reworked sqlrepository, made sets static, please check