tested and added some feature