rewrite handlers
fix some bugs
print out server name at start