declare function done and works