Implemented cases statement