fix available bug, add check statements
new comment