Some base function

I hope you with a better way to complete it