abstract to function