replace two constructor with a retriever object