fixed position detection
updated demo and documentation