Added functional code