maybe move that to model to avoid duplication