Resolved issue #15 and implemented enhancement #13