initial implementation

assumed dictionary has sorted items; east is always first and west is
always second