added single line declaration
added error messages and exceptions, assignment type checking