fixed some issues
working example