copied files from generalzo