small modifications
added test for token