1st update with ruby logic in controllers