changed .sh and added new demo and tests for it