add new rule functions ad db functions