a lot of base code still doesnt work though, keeps throwing out of bounds exceptions