avoided nullPointerException