optimized two of the cases a tad more