add note
refactor util, add test code for server - not complete yet!