Finished implementing the sparse filter - might make modifications later to get it to play with the other functions/files