changed .create_at to be an if statement