Refactor the signature using types

what do you think? @diegozea