improving interface and struct use