replaced const states to enum