Added final WORKING code!!!!!!!!!!