sample: refactor again

Signed-off-by: Arnav Gupta <championswimmer@aokp.co>