added more logic to cell resources