Update

New Function and bug fixes