added support for leave requests - still buggy though