add assertion statement and remove sysout
remove sysouts
rename parameter "near" to "within"