Updated program, fixes #28