Solution for #24
Learned something ;)