fixed test. seems to work for one layer