Fixing code
Functions