cleaning up to use codeIgnitor