removing JS implementation in favor of php implementation