final version. WORKING.