Aaaall gen functions done