changed repository constructor