add data to collection via seperate javascript calls