null problem fixed with (try)