improve gravator method and add some testing
finish sign in