functions added and test created