added support for apply functions; improved zip