populates data but too much repeated code that I have to fix