update interface for web service and move into stats package