Merged #14 and #15