use first_or_create instead of redundant codes