Adapted for new arguments