updated, almost finished