working code before home processing code