embed worked, next step: refactor and resize func