move logic to partial class