added directory parsing - not tested, use carefully :P