updated to fit final version