version 1.2 - Add error checking