added pointer dereferenceing
added line number to error messages
added errors