bound result by 0 and 255