Most of case implementation.