Implemented reading factors from dataBase