updated render callback behaviour