managed to call function