added loop count for testing