fixed scheme
fixed bugs