adding data_cache and test function, redesign for user_limit