Working on stuff

piece validation mainly, function seems to be almost there. still buggy
tho