everything done except upload functionality