added some basic validation. needs specs