fixin some minor bugs & adding examples