moved old code to 'legacy' folder