ugly solution