added control rank. output not working?