initial mal implementation
refactor