add some format checking