added parting functionality