PR for issues 20, 21

See #20 
See #21