added limits on functions