Working, but ugly implementation