dynamic heap allocation check implemented'