curry entry function