write function
base components for game