changed repository APIs, completed test
minor