updating code to work with play 2.2.1