added expectations; renamed function