initial commit, tested and working in wp 3.7.1