Working Code so far