finish initil functionality