added directory and started converting code