change legend() to accept function, not just string
version bump