require rps javascript logic into app; now works on front page