Final changes to make it working