more functions

now can deal
more changes

now there is a validity checker in place