working
merged everything