More sensible code