working towards compacting code...