split function into separate nx files