Updated with initial working version