wrote some code in src/proto.py, mainly directory related code