added function to fill rs functions (for Lua and GUI)