Ad-hoc with some edge cases