an attempt to solve #37