Added APIs and main