this try catch should be removed and moved upward