implementing better custom renderer