API inner  logic corrections