merged with working code
merged with working code