beginning of margin server