fixed issue #14

fixed issue #14 and added GUI test