Added logic to rendering