changed dir implementation
merged server and client