functions simplified