fixed some stuff and test for random
fixed out of wall