somewhat piccolo-like bounds-handling added in