some error handling added