application of polymorpic function