added test and scripts