split #slim to smaller methods
simplify nil checks