my impl of ranknet