spent too long on a simple solution