updated main and models

adding friends functionality