used for my algorithms implementation