[CORE] implemented storing data into db