Improving ISINBOX functions