added outline for listener and altered server slightly