sort function implemented, can sort by date or tag atm, need to implement sort direction toggle.