working on #42. improved obj validation. small bug fixes