added better bounds function still doesnt work