condense code