fields changed to immutable
null pointer exception-resolved