First atempt, works but I used hashes