first iteration able to read from database