-adding functionality to append by function