implemented note factory with some errors