client intial logic