fix indent
merge working code