Added popularity algorithm
fixed schema conflict