Updated: added generic printOperations() functions