Added implementation of IC 5,6 with abstracted functions