Start adding support for Apply function