test insersion sort when fetching values from firebase