fixing nullPointerException error in getMatt()