added schema attribute to all necessary functions