need further error checking, start to expand