more sane code