use API instead of hardcoding