Model for both neutrino masses and dark matter