everything before synthesis working