added errors to programs