improve checks arguments and refracto