replace undefined this