use try to prevent nil