fixed a syntax error in persistor and added a method 'first' to repositort