might want to think of java api of this when moving into play?