tidied up edge case