modified app models and pin user id