DO NOT USE THIS ANY MORE (code merged with server)