used synthesize (simplified the whole implementation part)