changed getEndLocation from [location + size] to 
[location + (size - 1)]