some apis deprecated to new ones; move constants to class Constants