WORKING CODE.